<html>
<html>
<div class="row">
			<div class="span8" style="height:420px;">
				<% @event= Event.new if @event.nil? %>
				<%= form_for @event, :html => {:multipart => true, :class => "event-new"} do |f| %>
				<div style="padding-left:20px" align="center">
					<div class="event-content">
						<h3><%=f.text_field(:title, :placeholder => "Enter the event's Title", :style=>'width: 320px;')%></h3>
						<p style="color:grey;font-size:14px;float:right;">Dates:  &nbsp; <%=f.text_field(:start_date, :placeholder => "DD/MM/YYYY", :style=>'width: 90px;')%> to <%=f.text_field(:end_date, :placeholder => "DD/MM/YYYY", :style=>'width: 90px;')%></p>
						</br>
						</br>
						<p><%=f.text_area(:description, :style=>'width: 320px;height:200px',:placeholder => "Enter the event's description")%></p>
						<p>Image: <%= f.file_field(:photo) %> </p>
						<%= f.submit("Create event", :class => "btn btn-success")%>
					</div>
				</div>
				<% end %>
			</div>
			<div class="span4">
				<div style="height:400px;border-left:1px solid #a0a0a0;padding-left:20px;width:330px;overflow:auto;">
					<% @events.each do |event| %>
					<a href="/events/<%=event.id%>" style="color:black"><div class="event-box">
						<div class="event-image"> <%= image_tag(event.photo.url, :size => "50x64") %> </div>
						<div class="event-title"><b><%= event.title %></b></div>
						<div class="event-date">
							<%= event.start_date.strftime("%A") %></br>
							<%= event.start_date.strftime("%d") %></br>
							<%= event.start_date.strftime("%B") %>
						</div>
					</div></a>
					<% end %>
				</div>
			</div>
		</div>
	</div>
</html>
<div>
		
</div>

</html>
